home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-02 | 8.1 KB | 179 lines | [TEXT/MMCC] |
- Think Class Library v1.1.3 Porting Kit v3.1 ⌐1993-1995 Yellow Shark AB
-
- README - the manual
-
- Welcome to version 3.1 of the TCL 1.1.3 porting package. This package will
- allow you to port your TCL 1.1.3 applications, and your TCL 1.1.3 library,
- to Metrowerks CodeWarrior, and probably other C++ compilers found on the
- Macintosh, and also to compile the TCL for Power Macintosh.
-
- Before you use the software included, be sure to read the license at the
- end of this document, and agree with it. IF YOU DON'T AGRE WITH AND ABIDE
- BY THE LICENSE, YOU CANNOT USE THE INCLUDED SOFTWARE!
-
- A side effect of the new (in 3.0) RTTI stuff is that you can use this
- porting kit if you want to move your TCL 1.1.3 application to TCL 2.0;
- this RTTI and the Symantec TCL 2.0 RTTI look very much the same at the
- macro level, so much of the work will be done for you. Then use Eric
- Scouten's TCL 2.0 porting kit to compile TCL 2.0 with CodeWarrior!
-
- This kit is produced and tested using CW5 final compilers for 68K and PPC,
- and has been used on a large (>100000 line) application with good results.
- You need version 2 or later of the universal headers (included in CW5)
-
- If you're getting ready to go, this is how to do it:
-
- 0) Read through all of the instructions before beginning. Most important,
- read through the common munger instructions before starting any munging
- application.
-
- 1) Back up everything. Just to be safe.
-
- 2) Install Symantec C++ version 6.0 on your hard disk. You only need the
- TCL 1.1.3 folder, but it's easiest to grab the whole package.
-
- 3) Run the MultiDiff application provided, applying the TCL Diff 3.0 file
- provided on the Think Class Library 1.1.3 folder. The diff file
- distributed only contains my additions to the TCL; therefore it's free of
- Symantec copyright.
-
- 4) Move the converted TCL 1.1.3 folder into the Pointer TCL 3.1 folder,
- and place that folder somewhere convenient. Inside the CodeWarrior folder
- is NOT a good idea. Rename "Think Class Library 1.1.3" to "inherited
- sources".
-
- 5) If you have used version 2.0 or 2.1 of the TCL porting package you
- should build and run the retromung munger application on your project
- folder. <see common munger instructions below>
- If you have used version 3.0 of the porting kit, you only have to replace
- your copy of the munged TCL 1.1.3 folder and the " new source" folder,
- since the mungers have not changed.
-
- 6) Copy the file TCL CLASSLIST into the Mungers folder and rename it
- CLASSLIST. (No period in the name) Then run the buildclasslist munger on
- your project folder.
-
- 7) <optionally> run the disinherit munger to expand "inherited" into the
- actual superclass name. This requires a complete CLASSLIST from the step
- above.
-
- 8) Run the insertmacros munger on your project folder. This will insert
- TCL_DECLARE_CLASS and TCL_DEFINE_CLASS macros in your source. It will also
- change struct classes to real class classes.
-
- 9) Run the deconflict munger on your project folder. This will change all
- occurences of GetItem to the proper method name or toolbox call, as well
- as fix some other similar problems (it does this by counting arguments in
- the argument list)
-
- 10) <optionally> run the headerprot munger on your project folder. This
- will insert multiple-inclusion protection using the __HEADER_FILE__
- convention. CodeWarrior supports #pragma once, but some other compilers
- don't.
-
- 11) Move your project file to somewhere handy. Create a CodeWarrior
- project file by running Convert*Projects, or by adding your files to the
- included project files. Remember the appropriate runtime libraries! Add
- the Pointer TCL folder from step 4 to the project access path list.
- The folder containing both "inherited" and "new" sources should be the
- one added, not just the converted "inherited sources" folder. You should
- remove or convert any assembly files you may use; the TCL assembly files
- are no longer needed. The provided 68K project is segmented to fit into
- the near code model, but you need far data. The segmentation is also
- sub-optimal.
-
- 12) Compile your project. Where you get complaints about type mismatches,
- there may be one of several problems:
- -In version 2.0 of the Universal Headers, WindowPtr and WindowPeek have
- been replaced with a WindowRef type.
- -Using universal headers, you have to create universal procedure pointers
- wherever you pass a ProcPtr to the toolbox. For instance:
-
- StandardGetFile(MyFileFilter, numTypes, typeList, &reply);
-
- would become:
-
- static FileFilterUPP MyFileFilterUPP = NewFileFilterProc(MyFileFilter);
- StandardGetFile(MyFileFilterUPP, numTypes, typeList, &reply);
-
- This is by far the easiest way to allocate and handle UPPs, and works for
- both 68K and PowerPC code. For more info, see the comp.sys.mac.programmer
- FAQ, available on http://www.nada.kth.se/~d88-jwa/mac-faq.html or via FTP on
- ftp.nada.kth.se:pub/hacks/mac-faq/CSMP_PD_FAQ
- Another good reference is New Inside Macintosh: PowerPC System Software
-
- You may want to use #pragma options align=mac68k around data structures you
- write to disk or resources, to use the faster PowerPC alignment when
- compiling for PowerPC. The new TCL sources do this, surrounded by the
- preprocessor symbol NOPRAGMAALIGN. Unfortunately, the Universal Headers
- included with CW5 will not support anything but plain 68k aligmnent when
- compiling for the 68k.
-
- You may have to force references to classes you create using new_by_name by
- calling member() on them, or something similar. This is because of a slight
- feature in the CodeWarrior linker, where it decides an object is not
- referenced when all you do with it is to create it static; despite the fact
- that the object constructor has side effects.
-
-
- 13) Congratulations! You're now done! Unless you're using a library that's
- only available for the 68K Mac, in which case you need to get an upgrade
- from your supplier. I can't do everything for you :-)
-
-
- EXCEPTION HANDLING
-
- The exception handling package is good enough, but not perfect. Most
- notably, if you have more than one exception handler within a function, all
- but one muse change their TRY clause to TRY_MULTIPLE. You cannot use RETRY
- within a TRY_MULTIPLE clause, but if you do, no warning may be given. Watch
- out!
-
- The exception library can be rewritten using switch() instead of goto, and
- if I ever get more time, I will do this for a X.Y version of the porting
- kit. However, it IS usable as it is; we're shipping commercial applications
- with it, so don't hold your breath for the new version.
-
-
- INSTRUCTIONS FOR RUNNING THE MUNGER APPLICATIONS:
-
- All the mungers require you to first build the munglib.lib and liblib.lib
- libraries. When you run them, most of them look for a file called
- "CLASSLIST" in the folder they're in. They all do their work on whatever
- is in the folder or alias called TO MUNG in the same folder as the munger
- application; this includes sub-folders of TO MUNG. It *will* follow
- aliases recursively, so remove any pointing to code you don't want
- munged!
-
- All mungers are PowerPC projects. If you run on a 68K Mac, upgrade :-)
- Seriously, you can change liblib.lib to include the relevant 68K libraries,
- re-build munglib.lib and the mungers with the 68K compiler. That's why we
- included liblib.lib instead of the libraries in the munger applications!
- You need ANSI, SIOUX, MacOS.lib and maybe SANE.
-
-
- CREDITS
-
- Most of the grunt work for this port was made by Bo Lindbergh for me.
- He may be reached as d88-bli@nada.kth.se. I may be reached as
- h+@metrowerks.com, but I cannot promise to support this port more than on
- my spare time. THIS IS NOT A METROWERKS OFFERING.
-
- We would appreciate if you mailed comments, suggestions, and products
- relating to or created by this port package to us.
-
-
- LICENSE
-
- This software is provided as a public service free of charge. It is
- copyrighted ⌐1994 Yellow Shark AB, published in Stockholm, Sweden.
- Permission is granted to use this software and derivatives you make
- thereof, provided that any such use is AT YOUR OWN RISK and that you agree
- to, in all cases, take full responsibility for any malfunction or defect
- in the software or the results thereof.
-
- IF YOU CANNOT OR WILL NOT AGREE TO THIS LICENSE, OR YOUR LOCAL LAWS DO NOT
- ALLOW THIS REDUCTION OF YELLOW SHARK ABs' LIABILITY TO ZERO, YOU ARE NOT
- ALLOWED TO USE THE SOFTWARE.
-
-